package com.quickstart.admin.service;

import com.quickstart.admin.dao.AdminMapper;
import com.quickstart.entity.AdminEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author:wesley
 */
@Service
public class AdminService {


    @Autowired
    private AdminMapper adminMapper;


    public AdminEntity login(String name,String pass){
        AdminEntity admin = adminMapper.getAdmin(name);
        if (admin != null && (admin.getPassword().equals(pass))) {
            return admin;
        } else {
            return null;
        }
    }


}
